<!DOCTYPE html>
<meta charset="utf-8">
<title>mathcolor on mtext (reference)</title>
<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mtext mathcolor="green">□■□■□■□</mtext>
</math>

